home *** CD-ROM | disk | FTP | other *** search
/ NetNews Offline 2 / NetNews Offline Volume 2.iso / news / comp / lang / c-part1 / 740 < prev    next >
Encoding:
Internet Message Format  |  1996-08-05  |  914 b 

  1. Path: usenet.ufl.edu!vtigadi
  2. From: vtigadi@cis.ufl.edu (Vishwajit Tigadi)
  3. Newsgroups: comp.lang.c
  4. Subject: A problem with fprintf
  5. Date: 8 Jan 1996 23:15:26 GMT
  6. Organization: University of Florida, Computer Science Department
  7. Distribution: world
  8. Message-ID: <4cs8ie$5ru@no-names.nerdc.ufl.edu>
  9. NNTP-Posting-Host: yawl.cis.ufl.edu
  10. Originator: vtigadi@yawl.cis.ufl.edu
  11.  
  12.  
  13.  
  14. hi!
  15.  
  16. I am experiencing a peculiar problem with fprintf.
  17.  
  18. I have a piece of code where the following statement fits in:
  19.  
  20. fprintf(fp, "%s\n", src);
  21.  
  22. fp is a file-pointer and src is a static array of characters. When the
  23. code is executed repeatedly, it fails at the above statement. The error
  24. message from the debugger is as follows:
  25.  
  26. signal SEGV (segmentation violation) in malloc at 0xef778634
  27. malloc+0x150:   st      %o0, [%l5]
  28.  
  29. fp is pointing to a file that has been opened and is not the problem.
  30. Does somebody have a clue?
  31.  
  32. Thanks
  33. vishwajit
  34.  
  35.